package model.Actions;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import DB.Connection.DBConnectionManager;

import commons.Entities.LegenDate;

import controller.ControllerFunctions;

public class addUserLegenDateAction implements Runnable {

	private static final Log logger = LogFactory.getLog(addUserLegenDateAction.class);

	private LegenDate legenDate;

	public addUserLegenDateAction(LegenDate legenDate) {
		this.legenDate = legenDate;
	}

	@Override
	public void run() {
		logger.info("addUserLegenDateAction starting...");

		DBConnectionManager.get().insertToDatesTable(legenDate);
		ControllerFunctions.get().getUserLegenDates(legenDate.getUserID());

		logger.info("addUserLegenDateAction ended.");
	}
}
